function notify(msg) {
    var create_notify = function(msg) {
        var id ='notification' + parseInt(Math.random() * 1000); 
        var str = '<div class="notification" id="'+ id +'">'
            + '<a href="#" class="notification-close-btn"></a>'
            + msg +'</div>';
        return [id, str];
    }
    var notification = create_notify(msg);
    $('#notify-area').append(notification[1]);
    var id = '#' + notification[0];
    $(id).hover(function () {
            $(this).fadeTo('fast', 0.25);
        }, 
        function () {
            $(this).fadeTo('fast', 0.75);
        });
    $(id).find('a').click(function () {
            $(id).fadeOut('slow');
        })
    $(id).boxShadow(0, 0, 10, '#000');
    window.setTimeout(function () {
            $(id).fadeOut('slow');
            }, 7000);
    window.setTimeout(function () {
            $(id).remove();
            }, 10000);
    $(id).fadeIn('slow');
}

function switch_toolbar(bar, searchbar) {
    $('#toolbars .toolbar').hide();
    $(bar).show();
    if (searchbar)
        $('#search-bar').show();
    else 
        $('#search-bar').hide();
}

function toggle_edit_panel(mode) {
    if (mode && mode == 'show') {
        global.layout.sizePane('north', 85);
        $('#center-top-border').height(35);
    } else {
        global.layout.sizePane('north', 55);
        $('#center-top-border').height(5);
    }
}

 



